<?php

defined('_JEXEC') or die();

jimport('joomla.application.component.model');

class Easiv2ModelManageInstances extends JModel {
	
	protected $db;  	
	
	function __construct() {
		parent::__construct();
		
		$this->db = JFactory::getDBO();
	}
	
	/**
	 * Model function return all rows of the easiv2_instances table for overview in manageInstances view
	 * 
	 * @return All instance Infos from the database
	 */
	function getInstanceInfo() {
		
		$this->db->setQuery("SELECT * FROM #__easiv2_instances ORDER BY id");

		$data = $this->db->loadObjectList();
		
		return $data;
	}
}